/**
 * 
 */
package com.link;

import java.util.LinkedList;

/**
 * @author LvSaiHui {gurnfe@163.com}
 * @version 1.0 <br>
 *          Copyright (C), 2007-2008, ZJUT <br>
 *          This program is protected by copyright laws. <br>
 *          Program Name: Queue.java <br>
 *          Date: Feb 8, 2009 <br>
 *          Description:
 */
public class Queue<T> {
	private LinkedList<T> queue = new LinkedList<T>();

	public synchronized  void enQueue(T t) {
		queue.addLast(t);
	}

	public synchronized T deQueue() {
		return queue.removeFirst();
	}

	public synchronized  boolean isQueueEmpty() {
		return queue.isEmpty();
	}

	public synchronized  boolean contians(T t) {
		return queue.contains(t);
	}

	public synchronized  boolean empty() {
		return queue.isEmpty();
	}
}